function tax(i){
    if (i<5000){
        return '不交税'
    }else {if(i>8000){
        return '交'+(i-8000)*0.1
    }else{return '交'+(i-5000)*0.05}}
}
console.log(tax(6000))